# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Maintainer: Giancarlo Razzolini <grazzolini@archlinux.org>
# Contributor: Sefa Eyeoglu <contact@scrumplex.net>

pkgname=libliftoff
pkgver=0.4.1
pkgrel=1
pkgdesc='Lightweight KMS plane library'
arch=(loong64 x86_64)
url=https://gitlab.freedesktop.org/emersion/libliftoff
license=(MIT)
depends=(
  glibc
  libdrm
)
makedepends=(
  git
  meson
)
provides=(libliftoff.so)
_tag=e045589f37835d66e3ffe8130a597bb4eb9ee08f
source=(git+https://gitlab.freedesktop.org/emersion/libliftoff.git#tag=${_tag})
b2sums=(SKIP)

pkgver() {
  cd libliftoff
  git describe --tags | sed 's/^v//; s/-/.r/; s/-g/./'
}

build() {
  arch-meson libliftoff build
  meson compile -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="${pkgdir}" meson install -C build
  install -Dm 644 libliftoff/LICENSE -t "${pkgdir}"/usr/share/licenses/libliftoff/
  install -Dm 644 libliftoff/README.md -t "${pkgdir}"/usr/share/doc/libliftoff/
}

# vim: ts=2 sw=2 et:
